import JsonToTS from "json-to-ts";
import fs from "fs";
import { type } from "os";

const json = JSON.parse(`{"age":1,"name":"sdfa","are":{"key":1,"value":"value"}}`);
const json1 = `{"age":1,"name":"sdfa","are":{"key":1,"value":"value"}}`

let fss = fs.createWriteStream("../../src/core/db/vo/data.d.ts");
fss.write("declare module Data {\r\n");
JsonToTS(json, { rootName: "Info" }).forEach(v => {
    fss.write( v+"\r\n" );
    console.log(v);
})
fss.end("\r\n}", () => {
    console.log("写入成功")
})


